/**
 * This code is released under lgpl v3 license.
 * All rights reserved.
*/

package bridge;

import com.google.gwt.core.client.JavaScriptObject;
import flash.display.DisplayObject;

/**
 * FABridge instance overlay type
 * @author yuan yunchang    dukerr@gmail.com
 */
public class FABridgeInstance extends JavaScriptObject{

    protected FABridgeInstance() {
    }
    /**
     * 
     * @return  get bridge name
     */
    public native final String getName()/*-{
    return this.name.toString();
    }-*/;
    public native final DisplayObject root()/*-{
    return this.root();
    }-*/;
    public final void releaseASObjects(){
        releaseASObjectsImpl();
    }
    private native final void releaseASObjectsImpl()/*-{
    this.releaseASObjects()
    }-*/;
    public final boolean releaseNamedASObject(AS3Proxy obj){
        if(obj!=null){
            return releaseNamedASObjectImpl(obj);
        }else{
            return false;
        }
    }
    private native final boolean releaseNamedASObjectImpl(AS3Proxy obj)/*-{
    return this.releaseNamedASObject(obj)
    }-*/;
    public native final AS3Proxy create(String className)/*-{
    return this.create(className)
    }-*/;
    

}
